package com.fulu.designmode.behaviour.strategy_pattern;

/**
 * 行为型模式之策略模式
 */
public class StrategyPatternDemo {
    public static void main(String[] args) {
        Context context = new Context(new AddStrategy());
        System.out.println(context.executeStrategy(1, 2));
        context = new Context((new MultiplyStrategy()));
        System.out.println(context.executeStrategy(1, 2));
    }
}
